fix(ui5-multi-combobox): correct Select All with grouped items and n-more popover#13721
fix(ui5-multi-combobox): correct Select All with grouped items and n-more popover#13721Vonahz wants to merge 8 commits into
Conversation
…mcmbbx_selectall
|
🚀 Deployed on https://pr-13721--ui5-webcomponents-preview.netlify.app |
…mcmbbx_selectall
| }); | ||
|
|
||
| // Hide unselected items and empty groups using CSS | ||
| allItems.forEach(item => { |
There was a problem hiding this comment.
Do you really need this code that modifies the css property?
| return item.selected; | ||
| }); | ||
|
|
||
| this._filteredItems = [...filtered]; |
There was a problem hiding this comment.
You can remove lines from 1684 to 1698 and replace them with:
this._filteredItems = allItems.filter(item => (item.isGroupItem ? item._isVisible : item.selected));
| item._isVisible = visibleItems ? visibleItems.includes(item) : true; | ||
| } | ||
| // Reset display style | ||
| (item as HTMLElement).style.display = ""; |
There was a problem hiding this comment.
Remove this line because the _applySelectedItemsFilter will no longer change the item style.display
| .find("[ui5-token]") | ||
| .should("have.length", 3); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Add some tests related to Select All when you have the n-more popover opened
| } | ||
|
|
||
| // Restore autocomplete on next tick to allow normal typing | ||
| setTimeout(() => { |
There was a problem hiding this comment.
In which case we need this setTimeout ? Can we remove it and also remove the line at 1170?
| * Used when selections change while the n-more popup is open. | ||
| * @private | ||
| */ | ||
| _updateGroupsVisibility() { |
There was a problem hiding this comment.
I think we can go without this method _updateGroupsVisibility and all its calls. Can you please check if it works without it for the scenario it was added.
|
Design questions:
|
Fixes: #13712